// 定义奥特曼类
class Automan {
    private String name;
    private int attackValue;
    private int hp;

    public Automan(String name, int attackValue, int hp) {
        this.name = name;
        this.attackValue = attackValue;
        this.hp = hp;
    }

    // Getter 和 Setter 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAttackValue() {
        return attackValue;
    }

    public void setAttackValue(int attackValue) {
        this.attackValue = attackValue;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public void fly() {
        System.out.println(name + "在飞行！");
    }

    public void lightAttack(Monster monster) {
        System.out.println(name + "发动光线攻击" + monster.getName());
        monster.setHp(monster.getHp() - this.attackValue);
        System.out.println("怪物" + monster.getName() + "剩余血量：" + monster.getHp());
    }
}

// 定义怪物类
class Monster {
    private String name;
    private int attackValue;
    private int hp;

    public Monster(String name, int attackValue, int hp) {
        this.name = name;
        this.attackValue = attackValue;
        this.hp = hp;
    }

    public Monster() {}

    // Getter 和 Setter 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAttackValue() {
        return attackValue;
    }

    public void setAttackValue(int attackValue) {
        this.attackValue = attackValue;
    }

    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        this.hp = hp;
    }

    public void run() {
        System.out.println("怪物" + name + "在奔跑！");
    }

    public void brutalAttack(Automan automan) {
        System.out.println("怪物" + name + "发动强力攻击" + automan.getName());
        automan.setHp(automan.getHp() - this.attackValue);
        if (automan.getHp() < 0) {
            automan.setHp(0);
        }
        System.out.println("奥特曼" + automan.getName() + "剩余血量：" + automan.getHp());
    }
}